// token

// 存token
const TT_TOKEN = 'TT_TOKEN'
export function setToken (token) {
  localStorage.setItem(TT_TOKEN, JSON.stringify(token))
}
// 取token
export function getToken () {
  try {
    return JSON.parse(localStorage.getItem(TT_TOKEN))
  } catch (error) {
    console.log(error)
    console.log(localStorage.getItem(TT_TOKEN))
  }
}
// 删token
export function delToken () {
  localStorage.removeItem(TT_TOKEN)
}
